package monitors
{
	import assets.Globals;
	
	import flash.ui.Keyboard;

	/**
	 * Handles keyboard events
	 * TODO: static?
	 */
	public class KeyMonitor
	{
		public static function keyPressed(key:uint):void
		{
			switch(key)
			{
				case Keyboard.ENTER:
				{
					Globals.state = Globals.GAME_STATE;
					break;
				}
				case Keyboard.ESCAPE:
				{
					Globals.state = Globals.MENU_STATE;
					break;
				}
			}
		}
	}
}